package cn.shenchao.basedao;

import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Date;

public class BaseDao {
	public static void main(String[] args) throws Exception, SecurityException {
		BaseDaoImpl impl = new BaseDaoImpl();
//		impl.get();
		Method m = BaseDao.class.getMethod("test", ArrayList.class);
		Type[] genericParameterTypes = m.getGenericParameterTypes();
		ParameterizedType type = (ParameterizedType) genericParameterTypes[0];
		System.out.println(type.getActualTypeArguments()[0]);
	}
	public static void test(ArrayList<Date> arrayList){
		System.out.println("hello");
//		StringIndexOutOfBoundsExceptionfdsafdsa
System.err.println('h');
		System.out.println("hhh");
		System.err.println('h');
	}
	
}
